home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / FileFilter.java < prev    next >
Text File  |  1998-06-30  |  2KB  |  53 lines

  1. /*
  2.  * @(#)FileFilter.java    1.3 98/04/14
  3.  * 
  4.  * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21. package com.sun.java.swing.preview.filechooser;
  22.  
  23. import java.io.File;
  24.  
  25. /**
  26.  * FileFilter is an abstract class that has no default implemention.
  27.  * A FileFilter, once implemented, can be set on a JFileChooser to
  28.  * keep unwanted files from appearing in the directory listing.
  29.  *
  30.  * A default implementation (ExtensionFileFilter) is currently in the
  31.  * FileChooserDemo directory, and will become a first class swing
  32.  * implementation in Swing 1.0.3.
  33.  *
  34.  * @see JFileChooser#setFileFilter
  35.  * @see JFileChooser#setChoosableFileFilter
  36.  * @see SimpleFileFilter
  37.  *
  38.  * @version 1.3 04/14/98
  39.  * @author Jeff Dinkins
  40.  */
  41. public abstract class FileFilter {
  42.     /**
  43.      * Whether the given file is accepted by this filter.
  44.      */
  45.     public abstract boolean accept(File f);
  46.  
  47.     /**
  48.      * The description of this filter. For example: "JPG and GIF Images"
  49.      * @see FileView#getName
  50.      */
  51.     public abstract String getDescription();
  52. }
  53.